package main

import (
	"github.com/astaxie/beego"
	"map/models"
	_ "map/routers"
)

var timeFt string = "2006-01-01 15:04:05"

func main() {
	models.Init()
	initSession()
	beego.SetStaticPath("/upload", "static/upload")

	beego.SetLogger("file", `{"filename":"logs/test.log"}`)
	beego.SetLevel(beego.LevelInformational)
	beego.BeeLogger.DelLogger("console")

	beego.Run()
}

func initSession() {
	beego.BConfig.WebConfig.Session.SessionOn = true
	beego.BConfig.WebConfig.Session.SessionProvider = "file"
	beego.BConfig.WebConfig.Session.SessionProviderConfig = "./tmp"
}
